#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "mydialog.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{
    MyDialog* mydialog=new MyDialog(this);
    mydialog->resize(500,300);
    mydialog->setAttribute(Qt::WA_DeleteOnClose);

    mydialog->show();
}
